// 重置密码
$('.layui-form').on('submit', async e => {
  e.preventDefault()
  const data = {
    oldPwd: $('.oldPwd').val(),
    newPwd: $('.newPwd').val(),
  }
  const dataStr = handleDataFormat(data)
  const res = await reqUpdatePwdPost(dataStr)
  console.log(res)
  const { status, message } = res
  if (status === 0) {
    layer.msg(message, { time: 1500, icon: 1 })
    $('button[type=reset]').click()
    sessionStorage.removeItem('bigEventToken')
    // 外面的大页面跳转
    window.parent.location.href = '/login.html'
  } else {
    layer.msg(message, { time: 1500, icon: 2 })
  }
})
